<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Page
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: Delete.php 2010-08-31 16:05 idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Page
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 */

class Page_Form_Team_Delete extends Engine_Form {
	protected $_admin_id;
	protected $_page_id;
	
	public function setAdmin_id($value) {
		$this->_admin_id = $value;
	}
	
	public function setPage_id($value) {
		$this->_page_id = $value;
	}
	
	public function init() {
		$this->setTitle ( 'Delete Page Admin' )->setMethod ( 'post' )->setDescription ( 'Are you sure you want to delete page administrator?' )->setAttrib ( 'id', 'page_delete_admin' );
		
		$this->clearDecorators ();
		
		$this->addElement ( 'Hidden', 'admin_id', array ('type' => 'hidden', 'value' => $this->_admin_id ) );
		$this->addElement ( 'Hidden', 'page_id', array ('type' => 'hidden', 'value' => $this->_page_id ) );
		
		$this->addElement ( 'Button', 'submit', array ('label' => 'Delete', 'type' => 'submit', 'ignore' => true, 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addElement ( 'Cancel', 'cancel', array ('label' => 'cancel', 'link' => true, 'prependText' => ' or ', 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addDisplayGroup ( array ('submit', 'cancel' ), 'buttons', array ('decorators' => array ('FormElements' ) ) );
		
		$this->setAction ( Zend_Controller_Front::getInstance ()->getRouter ()->assemble ( array () ) )->setMethod ( 'POST' );
	}
}